<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript Const</title>
</head>
<body>
<h2>原始值</h2>
<!--如果我们将一个原始值赋给常量，我们就不能改变原始值-->
<p>您无法更改原始值。</p>

<p id="demo"></p>

<script>
  try{
    const PI = 3.141592653589793;
    PI = 3.14;
  }
  catch (err) {
    document.getElementById("demo").innerHTML = err;
  }
</script>
</body>
</html>